<template>
<div class="bh-tab-pane" v-show='this.tabs.actived == this.name'>
	<slot></slot>
</div>
</template>

<script>
export default {
	name: 'bh-tab-pane',
	inject: ['tabs'],//就是父级 select 的 this
	props: {
		name: String,
		label: String,
	},
	data() {
		return {
			visible: true,
		}
	},
	methods: {
		close() {
			this.visible = false;
			this.$emit('close');
		},
	},
	computed: {
		typeClass() {
			return `bh-alert-${ this.type }`;
		},
	},
	created() {
		console.log('tabs', this.tabs);
		this.tabs.tabpanes.push(this);
		this.tabs.tabpanesCount++;
	},
}
</script>
